<?php
class Category extends AppModel {

    public $validate = array(
    'seo_link' => array(
    'isUnique'=>array(
    'rule' => 'isUnique',
    'message' => 'Seo link already taken'),
    'notEmpty'=>array(
    'rule'=>'notEmpty',
    'message'=>'This field cannot be left blank')
    ),
    'name' => array(
    'isUnique'=>array(
    'rule' => 'isUnique',
    'message' => 'Name already taken'),
    'notEmpty'=>array(
    'rule'=>'notEmpty',
    'message'=>'This field cannot be left blank')
    ),
    );

    public $hasMany = array(
    'Article' => array('className' => 'Article',
    'foreignKey' => 'category_id',
    'conditions' => array('visible'=>1,'created<now()'),
    'fields' => '',
    'order' => 'Article.created desc',
    'limit' => '',
    'offset' => '',
    'dependent' => '',
    'exclusive' => '',
    'finderQuery' => '',
    'counterQuery' => ''),
    );

}
?>